Missing } in XML expression
Posted
by
Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2010-05-19T13:02:02Z
Indexed on
2012/04/04
23:29 UTC
Read the original article
Hit count: 90
I have an external javascript file that I want to, upon include, write some HTML to the end of the web page.
Upon doing so though I get the error Missing } in XML expression
on the line that uses dropdownhtml
.
Here is my code
var dropdownhtml = '<div id="dropdown"></div>';
$(document).ready(function(){
//$(document).append(dropdownhtml);
alert(dropdownhtml);
});
The XHTML webpage that includes this file does so like this:
<script type="text/javascript" src="/web/resources/js/dropdownmenu.js"></script>
Doing either append or alert throws up the same error, what is going wrong?
© Stack Overflow or respective owner